Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new timestamp format: %z %Y-%m-%d %H:%M:%S.%3 #439

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jackluo923
Copy link
Member

Description

Add new timestamp format: %z %Y-%m-%d %H:%M:%S.%3
Sample timestamp string: +0800 1970-01-01 08:00:00.235

@@ -182,6 +182,8 @@ void TimestampPattern::init() {
patterns.emplace_back(4, "%a %b %e %H:%M:%S %Y");
// E.g. Sun Jan 1 15:50:45 2015
patterns.emplace_back(0, "%a %b %e %H:%M:%S %Y");
// E.g. +0800 1970-01-01 08:00:00.235
patterns.emplace_back(0, "%z %Y-%m-%d %H:%M:%S.%3");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • %z is not a supported format specifier. You're probably thinking of a change that hasn't yet been fully merged. @LinZhihao-723 was working on it but he has other priorities at present.
  • We should also add a unit test for any new timestamp pattern we add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants